package com.rocket.consumer.controller;

import org.apache.rocketmq.spring.annotation.RocketMQMessageListener;
import org.apache.rocketmq.spring.core.RocketMQListener;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RestController;

@Component
@RocketMQMessageListener(topic = "mytopic", consumerGroup = "my-consumer-group")
public class Consumer implements RocketMQListener<String> {

    @Override
    public void onMessage(String str) {
        System.out.println("Consumer接收信息：" + str);
    }



}
